home *** CD-ROM | disk | FTP | other *** search
- property ptimeElapsed, pSpr
-
- on beginSprite me
- pSpr = sprite(me.spriteNum)
- mRefresh(me)
- pSpr.locZ = 97.5
- if inSlotMode() or inRecipeMode() then
- pSpr.visible = 0
- end if
- end
-
- on endSprite me
- pSpr.visible = 1
- pSpr.locZ = me.spriteNum
- end
-
- on exitFrame me
- global gMatrixMode, gFloatSprite, gPurgeRAM, gMemPurgeLimit
- if ticksSince(ptimeElapsed) >= 180 then
- mRefresh(me)
- if gMatrixMode then
- end if
- if (the freeBlock < gMemPurgeLimit) and (gPurgeRAM = 1) then
- showMemoryStatus()
- unloadMember()
- showMemoryStatus()
- if the freeBlock < (gMemPurgeLimit * 3) then
- gPurgeRAM = 0
- end if
- end if
- end if
- end
-
- on mRefresh me
- global gRetrievedGame, gStartRegisterSpr, gEndRegisterSpr, gTipPending, gPearlyGates, gUserQuitFlag
- if gRetrievedGame then
- exit
- end if
- if gPearlyGates or gUserQuitFlag then
- exit
- end if
- if inSlotMode() or inRecipeMode() then
- exit
- end if
- ptimeElapsed = nowTicks()
- if draggingAnything() then
- hideToolTip()
- end if
- timeHere = timeOnThisLevel()
- maxTime = maxTimeOnThisLevel()
- clockScale = clockScaleThisLevel()
- if gTipPending then
- exit
- end if
- if inGameMode() then
- if beyondMaxTips() then
- endOfLevel()
- else
- if timeHere > maxTime then
- if beyondMinTips() then
- endOfLevel()
- else
- if heavenly(checkHiScore(0)) then
- showHeaven()
- else
- endOfLevel()
- end if
- end if
- end if
- end if
- else
- if inBonusMode() then
- if timeHere > maxTime then
- stopMusic()
- soundFX2("bad_drink", 0, 1)
- dismissAllCrap(0)
- go("BonusSummary")
- end if
- end if
- end if
- percent = float(maxTime - timeHere) / max(0.10000000000000001, clockScale)
- newRotation = max(-90, min(integer((180 * percent) - 90), 90))
- if sprite(me.spriteNum).rotation <> newRotation then
- sprite(me.spriteNum).rotation = newRotation
- end if
- end
-